<!DOCTYPE html>
<html lang="en">
<head>
    <style>
        .triangle {
            width: 0;
            border-top: 50px solid red;
            border-right: 50px solid transparent;
            border-left: 50px solid transparent;
        }
        .d-triangle{
            width: 0;
            height: 0;
            border-top: 0px solid transparent;
            border-bottom: 50px solid transparent;
            border-left: 50px solid red;
            border-right: 0px solid red;
        }
    </style>
    <meta charset="UTF-8">
    <title>画三角形</title>
</head>
<body>
    <div class="triangle"></div>
    <div class="d-triangle"></div>
</body>
</html>
